package com.hzncc.flowable_diboot.service;

import com.diboot.core.service.BaseService;
import com.diboot.core.vo.JsonResult;
import com.diboot.core.vo.Pagination;
import com.hzncc.flowable_diboot.dto.CustomerDTO;
import com.hzncc.flowable_diboot.entity.Customer;
import com.hzncc.flowable_diboot.excel.model.CustomerOldCrmImportModel;
import com.hzncc.flowable_diboot.vo.CustomerDetailVO;
import com.hzncc.flowable_diboot.vo.CustomerListVO;

import java.util.List;
import java.util.Set;

/**
 * 客户 相关Service接口定义
 *
 * @author MyName
 * @version 1.0
 * @date 2024-05-15
 * Copyright © MyCorp
 */
public interface CustomerService extends BaseService<Customer> {

    JsonResult<List<CustomerListVO>> selectCustom(CustomerDTO queryDto, Pagination pagination, String type);

    JsonResult<?> trans(String uid, List<String> ids);

    void transSea(String cusId,String sea);

    void distribute(String cusId, String uid);

    CustomerDetailVO getDetail(String id);

    /**
     * 创建客户 添加重复创建检查
     *
     * @param customer
     * @author 陈广煜
     * @date 2024/6/13
     */
    JsonResult<?> createCustomer(Customer customer);

    Set<String> convertAndSave(List<CustomerOldCrmImportModel> list) throws InterruptedException;

    Boolean validateUnique(String field, String value);
}